import com.wudi.*;
import com.wudi.ConcreteFactory.FactoryApple;

public class Main {
    public static void main(String[] args) {

        AbstractProductPhone myPhone;
        AbstractProductPad myPad;
        AbstractProductLaptop myLaptop;
        AbstractProductEarphone myEarphone;

        IAbstractFactory factory= new FactoryApple();  //创建具体工厂（改FactoryApple/FactoryMedia）
        myPhone= factory.createProductPhone();
        myPad=factory.createProductPad();
        myLaptop=factory.createProductLaptop();
        myEarphone=factory.createProductEarphone();

        System.out.println(myPhone.ShowInfo());
        System.out.println(myPad.ShowInfo());
        System.out.println(myLaptop.ShowInfo());
        System.out.println(myEarphone.ShowInfo());
    }
}